package com.wcar.store.dao;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wcar.common.entity.Store;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;
public interface StoreDao extends BaseMapper<Store> {

    List<Store> selectStore(@Param("ew") QueryWrapper<Store> wrapper);
    @Select("select * from tb_store ts join tb_front_user_store tu on ts.store_id=tu.store_id where tu.user_id=#{userId}")
    List<Store> selectStoreById(Integer userId);
}
